package cn.dm.controller;

import cn.dm.common.Dto;
import cn.dm.service.LocalUserService;
import cn.dm.vo.QueryUserVo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user/api/v")
public class UserController {
    @Resource
    private LocalUserService localUserService;

    @PostMapping("/queryUserInfoByToken")
    @ResponseBody
    private Dto queryUserInfoByToken()throws Exception{
        return localUserService.queryUserInfoByToken();
    }

    @PostMapping("/modifyUserInfo")
    @ResponseBody
    private Dto modifyUserInfo(@RequestBody QueryUserVo queryUserVo)throws Exception{
        return localUserService.modifyUserInfo(queryUserVo);
    }
}
